package com.zsy.springframework.context.support;

import com.zsy.springframework.beans.facotry.exception.BeansException;

public class ClassPathXmlApplicationContext extends AbstractXmlApplicationContext {

    private final String[] configLocations;

    //从xml读取数据，并刷新
    public ClassPathXmlApplicationContext(String[] configLocations) {
        this.configLocations = configLocations;
        refresh();
    }

    public ClassPathXmlApplicationContext(String configLocations) throws BeansException {
        this(new String[]{configLocations});
    }


    @Override
    protected String[] getConfigLocation() {
        return configLocations;
    }
}
